package com.mall.order.dal.persistence;

import com.mall.commons.tool.tkmapper.TkMapper;
import com.mall.order.dal.entitys.Order;
import com.mall.order.dto.MyOrderDetailResponse;
import com.mall.order.dto.OrderDetailInfo;
import com.mall.order.dto.OrderGoods;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper extends TkMapper<Order> {
    Long countAll();

    List<OrderDetailInfo> selectUserAllOrders(@Param("userId") Long userId);

    MyOrderDetailResponse selectOrderDetail(@Param("orderId") String orderId);

    Integer cancelOrder(@Param("orderId") String orderId);

    List<OrderDetailInfo> getOrderDetailByUserId(@Param("id") Long id, @Param("size") Integer size, @Param("page") Integer page);

    OrderGoods getOrderGoodsResponse(@Param("orderId") String orderId);

    OrderGoods getOrderGoodsResponseUnique(@Param("orderId") String orderId);

}